package com.cims.bo.grave;

import java.util.List;

import com.cims.common.exception.BoException;
import com.cims.common.vo.Grave;
import com.cims.common.vo.Land;
import com.cims.common.vo.OrderItem;
import com.cims.dao.grave.GraveDAO;
import com.cims.dao.grave.GraveDAOImpl;

public class GraveBOImpl implements GraveBO{

	GraveDAO	dao	= new GraveDAOImpl();

	@Override
	public List<Grave> getListGrave() throws BoException{
		try{
			List<Grave> listGrave = dao.getListGrave();
			return listGrave;
		}catch(Exception e){
			return null;
		}
	}
	
	@Override
	public List<OrderItem> getListGraveOfCustomer(int customerId) throws BoException{
		try{
			List<OrderItem> listGrave = dao.getListGraveOfCustomer(customerId);
			return listGrave;
		}catch(Exception e){
			return null;
		}
	}

	@Override
	public Grave findByGraveId(int graveId) throws BoException{
		try{
			return dao.findByGraveId(graveId);
		}catch(Exception e){
		}
		return null;
	}

	@Override
	public boolean update(Grave grave) throws BoException{
		try{
			return dao.update(grave);
		}catch(Exception e){
		}
		return false;
	}

	@Override
	public boolean insert(Grave grave) throws BoException{
		try{
			return dao.insert(grave);
		}catch(Exception e){
		}
		return false;
	}

	@Override
	public List<Land> getListLand() throws BoException{
		try{
			return dao.getListLand();
		}catch(Exception e){
		}
		return null;
	}

}
